#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n;
	cin >> n;

	int cnt1, cnt2;
	cnt1 = cnt2 = 0;
	while (cin >> n) {
		if (n & 1)
			cnt1++;
		else
			cnt2++;
	}
	cout << cnt1 << " " << cnt2;
	return 0;
}
